<%= render :partial=>'/shared/manage_locales' %>

<%= form.error_messages %>

<% AVAILABLE_LOCALES.each do |locale| %>
  <% content_tag(:div, :id=>"block_#{locale}") do %>
    
    <%= form.label "title_#{locale}" %><br/>
    <%= form.text_field "title_#{locale}", :class=>"title" %>
    
    <% block_form :width=>550 do %>
      <% fields_for "structure[page_header]", @structure.header || Header.new do |h| %>
        <%= h.label "title_#{locale}" %><br/>
        <%= h.text_field "title_#{locale}", :class=>"text" %><br/>

        <%= h.label "keywords_#{locale}" %><br/>
        <%= h.text_field "keywords_#{locale}", :class=>"text" %><br/>

        <%= h.label "description_#{locale}" %><br/>
        <%= h.text_area "description_#{locale}", :cols=>70, :rows=>5 %><br/>
      <% end %>
    <% end %>
    
  <% end %>
<% end %>


<%= form.label :slug %><br/>
<%= form.text_field :slug, :class=>'text' %><br/>

<%= form.label :position %><br/>
<%= form.text_field :position %><br/>

<%= form.label :proposed_parent %><br/>
<%= form.select :proposed_parent, nested_set_options(Structure) {|i| "#{'–' * i.cached_level} #{i.title}"}, {:include_blank=>true}, {:style=>"width:300px;"} %><br/>

<%= form.label :css_class, 'Рисунок беграунда' %><br/>
<%= form.select :css_class, Structure::CSS_CLASS_NAMES %><br/>

<%= form.check_box :is_visible %> <%= form.label :is_visible %><br/><br/>

<%= form.label :slider, 'Флешка' %>
<%= form.file_field :slider_uploaded_data %>

<%= swf_object(@structure.slider.url, "flash_slide_show", '534', '237', "9.0.0",  {:wmode=>"transparent", :quality=>"high"}, {:url=>@structure.slider.url}, true) unless @structure.slider.blank?%>
